#include <cusp/array2d.h>
#include <cusp/permutation_matrix.h>
#include <cusp/print.h>

int main(void)
{
    // allocate storage for (4,4) matrix
    cusp::permutation_matrix<int,cusp::host_memory> A(4);

    // initialize matrix entries on host
    A.values[0] = 1; 
    A.values[1] = 3; 
    A.values[2] = 0; 
    A.values[3] = 2;

    // A now represents the following matrix
    //    [ 0 1 0 0 ]
    //    [ 0 0 0 1 ]
    //    [ 1 0 0 0 ]
    //    [ 0 0 1 0 ]

    // print matrix entries
    cusp::array2d<int,cusp::host_memory> B(A);
    cusp::print(B);

    return 0;
}

